<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>人员考评信息</title>
  </head>
  <link rel="stylesheet" type="text/css" href="css/style.css">
    <script src="/inc/js/ccorrect_btn.js"></script>
    <script src="js/sorttable.js"></script>
      <script src="js/main.js"></script>
       <script language="javascript" type="text/javascript" src="js/qy1.js"></script>
      <script type="text/javascript">
          function aa()
          {
             var zbm = document.getElementById("zbm").value;
             if(zbm=="bm"){
                document.getElementById("cs").style.display="none";
                document.getElementById("bm").style.display="block";
                document.getElementById("zwdiv").style.display="none";
                document.getElementById("jg").style.display="none";
                 document.getElementById("t1").setAttribute("width","800px");
             }
            else if(zbm=="zw"){
                document.getElementById("cs").style.display="none";
                document.getElementById("bm").style.display="none";
                document.getElementById("zwdiv").style.display="block";
                document.getElementById("jg").style.display="none";
             }
             else if(zbm=="kpjg"){
                document.getElementById("cs").style.display="none";
                document.getElementById("bm").style.display="none";
                document.getElementById("zwdiv").style.display="none";
                document.getElementById("jg").style.display="block";
             }
             else{
               document.getElementById("cs").style.display="block";
                document.getElementById("bm").style.display="none"
                document.getElementById("zwdiv").style.display="none";
                document.getElementById("jg").style.display="none";
                document.getElementById("cs").value="";
             }
          }
          function bmload()
          {
             var zbm = document.getElementById("bmbhid").value;
             if(zbm=="bm"){
                document.getElementById("cs").style.display="none";
                document.getElementById("bm").style.display="block";
                 document.getElementById("t1").setAttribute("width","800px");
                selectedaddr();
             }
             else if(zbm=="zw"){
                document.getElementById("cs").style.display="none";
                document.getElementById("bm").style.display="none";
                document.getElementById("zwdiv").style.display="block";
                document.getElementById("jg").style.display="none";
             }
             else if(zbm=="kpjg"){
                document.getElementById("cs").style.display="none";
                document.getElementById("bm").style.display="none";
                document.getElementById("zwdiv").style.display="none";
                document.getElementById("jg").style.display="block";
             }
             else{
               document.getElementById("cs").style.display="block";
                document.getElementById("bm").style.display="none"
                document.getElementById("jg").style.display="none";
                 document.getElementById("zwdiv").style.display="none";
             }
          }
      </script>
  <body onLoad="bmload();loaddw();selectedaddr();">
  <%Dlyh dlyh = (Dlyh)request.getSession().getAttribute("dlyh"); 
if((dlyh.getZd().getTypename().endsWith("乡")||dlyh.getZd().getTypename().equals("工业园区")||dlyh.getZd().getTypename().endsWith("镇")||dlyh.getZd().getTypename().endsWith("办")||dlyh.getZd().getTypename().endsWith("办事处")||dlyh.getZd().getTypename().endsWith("局")||dlyh.getZd().getTypename().endsWith("社")||dlyh.getZd().getTypename().endsWith("集团")||dlyh.getZd().getTypename().endsWith("院")||dlyh.getZd().getTypename().equals("民航"))){
   %>
  <input type="hidden" value="<%=request.getSession().getAttribute("shiqyid") %>" id="shiqyid" name="shiqyid" />
  <%}%>
  <input type="hidden" value="<%=dlyh.getZd().getParentid() %>" id="qyid" name="qyid" />
  <input type="hidden" value="<%=dlyh.getZd().getTypename() %>:<%=dlyh.getZd().getId() %>:<%=dlyh.getZd().getParentid() %>" id="dlyhzd" name="dlyhzd" />
  <input type="hidden" value="<%=request.getAttribute("shi") %>" id="shiid" name="shiid" />
  <input type="hidden" value="<%=request.getAttribute("xian") %>" id="xianid" name="xianid" />
  <input type="hidden" value="<%=request.getAttribute("xiang") %>" id="xiangid" name="xiangid" />
  <input type="hidden" value="<%=request.getAttribute("cun")%>" id="cunid" name="cunid" />
  <input type="hidden" value="<%=request.getAttribute("xianzhi") %>" id="xianzhi" name="xianzhi" />
  <input type="hidden" value="<%=request.getAttribute("zbm") %>" id="bmbhid" name="bmbhid" />
  <script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<form action="rykp.do?state=findall" id="f1" name="f1" method="post" name="searchForm">
<fieldset style="padding-left: 10%">
<legend>
	     条件查询：
</legend>
  <table border="0" id="t1" name="t1" cellspacing="0" cellpadding="2">
  <tr>
   <td align="right"> <font size="2px">时间查询：</font></td>
   <td class="TableData" align="right">
   <input type="text" name="kprq" size="15" id="kprq" onkeypress="if(event.keyCode==13) return false;" value="${kprq }" maxlength="100" onfocus="WdatePicker()"> 
          至 
    </td>
    <td class="TableData" align="left">
    <input type="text" name="kprq2" size="15" id="kprq2" onkeypress="if(event.keyCode==13) return false;" value="${kprq2 }" maxlength="100" onfocus="WdatePicker()"></td><td class="TableData"><br> 
    <td><br></td>
    <td><br>
    </td>
  </tr>

  <tr>
    <td align="right"><font size="2px">指标查询：</font> </td>
    <td>
	    <select name="zbm" id="zbm" onChange="aa();">
		<option value="xm" <c:if test="${zbm=='xm' }"> selected="selected"</c:if>>人员姓名</option>
		<option value="kpjg" <c:if test="${zbm=='kpjg' }"> selected="selected"</c:if>>考评结果</option>
		<option value="kpnr" <c:if test="${zbm=='kpnr'}"> selected="selected"</c:if>>考评内容</option>
		<option value="bm" <c:if test="${zbm=='bm' }"> selected="selected"</c:if>>部门</option>
		<option value="zw" <c:if test="${zbm=='zw' }"> selected="selected"</c:if>>职位</option>
	    </select>
	    <select name="czf" id="czf"> 
           <option value="=" <c:if test="${czf=='='}"> selected="selected"</c:if>>等于</option>
	       <option value="!=" <c:if test="${czf=='!='}"> selected="selected"</c:if>>不等于</option>
		   <option value=">"  <c:if test="${czf=='>'}"> selected="selected"</c:if>>大于</option>
		   <option value="<"  <c:if test="${czf=='<'}"> selected="selected"</c:if>>小于</option>
		   <option value="like"  <c:if test="${czf=='like'}"> selected="selected"</c:if>>包含</option>
		   <option value="not like"  <c:if test="${czf=='not like'}"> selected="selected"</c:if>>不包含</option>
       </select>
    </td>
    <td><div id="bm" style="display: none; " >
       <select disabled="disabled" id="sheng" name="sheng" >
           <option value="河北省">河北省</option>
        </select>省
        <select id="shi" name="shi" onChange="shichange(this.value)">
           <option>请选择市</option>
           <%List xianlist=(List) request.getSession().getAttribute("shilist"); 
            for(int i=0;i<xianlist.size();i++){%>
           <option value="<%=((Zd)xianlist.get(i)).getId() %>"><%=((Zd)xianlist.get(i)).getTypename() %></option>
           <%} %>
        </select>市
        <select id="xian" name="xian" onChange="xianchange(this.value)">
           <option>请选择县</option>
        </select>县
        <select id="xiang"  name="xiang" onChange="xiangchange(this.value)" >
         <option >请选择乡</option>
        </select>乡
        <select id="cun"  name="cun" >
        <option >请选择村</option>
        </select>村
    </div>
    <div id="jg" style="display: none; ">
       <select id="kpjgid" name="kpjgid">
          <option value="优秀" <c:if test="${kpjgid=='优秀' }">selected</c:if>>优秀</option>
          <option value="合格" <c:if test="${kpjgid=='合格' }">selected</c:if>>合格</option>
       </select>
    </div>
    <div id="zwdiv" style="display: none; ">
       <select name="zwid" id="zwid" >
            <c:forEach items="${zwList}" var="zw">
            <option value="${zw.typename}" <c:if test="${zwid==zw.typename }">selected</c:if>>${zw.typename}</option>
           </c:forEach>
          </select>　
    </div>
    <input name="cs" type="text" id="cs" size="15" maxlength="50" value="${cs}" onChange="checkType();" /></td>
    <td>
    <br>
    </td>
    <td><input type="submit" name="Submit" value="查询" /></td>
  </tr>
</table>
</fieldset>
<br/>
  <table class="TableTop" width="100%">
  <tbody><tr>
      <td class="left"></td>
      <td class="center subject"><span style="float:right">${fn:length(list)}条数据</span>
         人员考评</td>
      <td class="right"></td>
   </tr>
</tbody>
</table>
		
  <pg:pager url="rykp.do" index="half-full" maxPageItems="10"
			maxIndexPages="5" isOffset="<%=false%>"
			export="pageOffset,currentPageNumber=pageNumber" scope="request">
	<pg:param name="kprq" value="${kprq}"></pg:param>
	<pg:param name="zbm" value="${zbm}"></pg:param>
	<pg:param name="cs" value="${cs}"></pg:param>
	<pg:param name="kprq2" value="${kprq2}"></pg:param>
	<pg:param name="czf" value="${czf}"></pg:param>
	<pg:param name="xian" value="${xian}"></pg:param>
	<pg:param name="xiang" value="${xiang}"></pg:param>
	<pg:param name="kpjgid" value="${kpjgid}"></pg:param>
	<pg:param name="zwid" value="${zwid}"></pg:param>
    <table class="TableBlock" width="100%" border=1 align="center" >
       <tr class="title_text">
          <td nowrap align="center"  class="TableData">人员编号</td>
          <td nowrap align="center"  class="TableData">姓名</td>
          <td nowrap align="center"  class="TableData">姓别</td>
          <td nowrap align="center"  class="TableData">部门</td>
          <td nowrap align="center"  class="TableData">职位</td>
          <td nowrap align="center"  class="TableData">考评日期</td>
          <td nowrap align="center"  class="TableData">考评内容</td>
          <td nowrap align="center"  class="TableData">考评结果</td>
          <td nowrap align="center" class="TableData">备注</td>
          <td nowrap align="center"  class="TableData">操作</td>
       </tr>
     <c:forEach var ="rykp" items="${list}">
          <pg:item>
           <tr class="TableData">
             <td nowrap align="center">${rykp.ryzl.bh }</td>
             <td nowrap align="center"><a href="rykp.do?state=update&rykpid=${rykp.id }&uid=${rykp.ryzl.id }">${rykp.ryzl.xm }</a> </td>
             <td nowrap align="center">${rykp.ryzl.xb } </td>
             <td nowrap align="center">${rykp.ryzl.zdByBmbh.zdqc }</td>
             <td nowrap align="center">${rykp.ryzl.zdByZwbh.typename } </td>
             <td nowrap align="center">${rykp.kprqString }</td>
             <td nowrap align="center">
                <c:if test="${fn:length(rykp.kpnr)>36}">
              <c:forEach begin="0" end ="${fn:length(rykp.kpnr)}" var="i" step="36">
               ${fn:substring(rykp.kpnr,i,(i+36)) }<br/>
              </c:forEach>
               </c:if>
               <c:if test="${fn:length(rykp.kpnr)<=36}">${rykp.kpnr }</c:if>
             </td>
             <td nowrap align="center">${rykp.kpjg } </td>
             <td nowrap align="center">${rykp.bz } </td>
             <td nowrap align="center">
            <%if((dlyh.getZd().getTypename().endsWith("县")||dlyh.getZd().getTypename().endsWith("区")||dlyh.getZd().getTypename().equals("武安市"))&&!dlyh.getZd().getTypename().equals("工业园区"))
    			{ %>
 				 <a href="rykp.do?state=delete&rykpid=${rykp.id }&uid=${rykp.ryzl.id }" onClick="return confirm('确定要删除吗？');">删除</a>/<%} %><a href="rykp.do?state=update&rykpid=${rykp.id }&uid=${rykp.ryzl.id }">更新</a>
             </td>
           </tr>
            </pg:item>
        </c:forEach>
    </table>
      <pg:index>
				<center>
					<table border=0 cellpadding="5" cellspacing=0" style="font-size: 12px">
						<tr align="center" valign="top">
							<td valign="bottom"><br /></td>
							<pg:prev ifnull="true">
								<%if (pageUrl != null) {%>
                                <td align=right>
                                   
									<A HREF="<%=pageUrl%>&state=findall&pageNo=<%=pageNumber%>">上一页<br />
									</A>
								</td>
								<%} else {%>
								<td>
									上一页
								</td>
								<%}%>
							</pg:prev>
							<pg:pages>
								<%if (pageNumber == currentPageNumber) {%>
								<td>
									<font color=#A90A08><%=pageNumber%></font>
								</td>
								<%} else {%>
								<td>
									<A HREF="<%=pageUrl%>&state=findall&pageNo=<%=pageNumber%>"> <%=pageNumber%></A>
								</td>
								<%}%>
							</pg:pages>
							<pg:next ifnull="true">
								<%if (pageUrl!= null) {%>
								<td>
									<A HREF="<%=pageUrl%>&state=findall&pageNo=<%=pageNumber%>">下一页<br /></A>
								</td>
								<%} else {%>
								<td>
									下一页
								</td>
								<%}%>
							</pg:next>
						</tr>
					</table>
				</center>
			</pg:index>

		</pg:pager>
  </body>
</html>
